package com.hf.lianxi;

public class TestDrivwe {
    public static void main(String[] args) {
        //
        new Student();
        System.out.println("----------------------------");
        new Student();
        System.out.println("============================");
        //父类指向子类,重写
        Person person = new Student();
        //属性没有重写，输出父类的值，静态属性也一样
        System.out.println(person.preName);
        System.out.println("+++++++++++++++++++++++++++++++++");
        Student student = new Student();
        System.out.println(student.perName);

    }
}
